#!/bin/bash

echo "=============`date`======================================"

phone='13811063282 111111111'
hostname=`hostname`
who=`whoami`


. /etc/profile
. ~/.bashrc

function sendMsg(){
  for number in $phone
  do 
    echo $1 " don't exists in ${who}@${hostname}."
    #wall $1 " don't exists in ${who}@${hostname}."
    gsmsend-script $number@$1 " don't exists in ${who}@${hostname}."
  done
}


nc -w 10 -z nj03-game-m22dianquan59.nj03.baidu.com 8008 > /dev/null 2>&1
if [ $? -eq 0 ]; then
  echo "hiveserver ok"
else
  echo "hiveserver fail"
  sendMsg "hiveserver"
 
fi
